home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 19
/
Aminet 19 (1997)(GTI - Schatztruhe)[!][Jun 1997].iso
/
Aminet
/
comm
/
cnet
/
time_clock.lha
/
timerclock
/
TimeClockT
< prev
Wrap
Text File
|
1997-03-13
|
3KB
|
62 lines
/**************************************************************************\
$VER: TimeClock Timer, v2.00 (14-Mar-97) by Dotoran of Frontiers!
\**************************************************************************/
options results;signal on SYNTAX;signal on ERROR;signal on IOERR
a=sourceline(2);parse var a . ", "ver" ("vdate")" .
tr=transmit;se=sendstring;gu=getuser
a="rexxsupport.library";if ~show("l",a) then if ~addlib(a,0,-30) then exit
parse source . . fp .;df=left(fp,max(lastpos('/',fp),lastpos(':',fp)))
parse arg port id timer stime tl r ; reminder=strip(r)
mins=tl;if timer=2 then do;a=left(compress(time("n"),":"),4)
c=right(right(tl,4,"0")-a,4,"0");mins=(left(c,2)*60)+right(c,2);end
a=delay((mins*60)*50) /* Wait the specified number of minutes. */
a=getclip(word("CD TD",timer)"timer"id);parse var a p2 id timer st2 tl2 r2
if st2~=stime | tl~=tl2 | r~=r2 then exit
else do ; stime=st2 ; tl=tl2 ; r=r2 ; end
if p2~=port then port=p2
ADDRESS VALUE "CNETREXX"port
lf="0A"x ; gu 40 ; uid=result ; gu 1 ; handle=result
if timer=1 then do
text="r1cb A T T E N T I O N r0"lf||lf"ca "handle"c6, "
text=text"ce"tl" cfminutes c6have just c9elapsedc6!"
if reminder>"" then text=text||lf||lf"cf[ca"reminder"cf]"
end
else do
t=left(tl,2)":"right(tl,2);if length(tl)=3 then t=left(tl,1)":"right(tl,2)
text="r1cb A T T E N T I O N r0"lf||lf"ca "handle"c6, "
text=text"c6The cftime c6is now ce"t"c6!"
if reminder>"" then text=text||lf||lf"cf[ca"reminder"cf]"
end
if uid=id & getclip(word("CD TD",timer)"timer"id)>"" then call SENDOLM(text)
call setclip(word("CD TD",timer)"timer"id)
exit
SENDOLM: /* Sends a SYSTEM OLM Message */
parse arg text;gu 2307346;path=result;z="00"x;a=""
if exists(path"_olm"port) then a="a";name=path"_"a"olm"
a="w";if exists(name) then a="a";h=copies(z,58)strip(text)"0A1A0A"x
n=name||port;call forbid();call open(f1,n,a);call writeln(f1,h)
call close(f1);call permit();setobject d2c(0,4);putuser 1409746
gu 1101743;olm=result+1;setobject olm;putuser 1101743
return ""
exit
CHECK:;if ARG() & ARG(1)~="###PANIC" then return ARG(1)
getcarrier;if result="TRUE" then if ARG() then return ARG(1);else return
logentry "Lost Carrier!!";bufferflush;exit
SYNTAX:;ERROR:;IOERR:;e1="n1 Error: "rc" ("errortext(rc)")"
e2=" Line: "left(sigl,4)"File:";c="`"fp", "ver"'";e2=e2" "c;tr e1;tr e2
logentry e1;logentry e2;e=strip(translate(sourceline(sigl),"\{",""))
do while e~="";e3="Source: "left(e,37);tr e3;logentry e3;e=substr(e,38);end
bufferflush
/**************************************************************************\
\****************************************** Frontiers BBS (716)/823-9892 **/